home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
015a
/
vaxutils.zip
/
LASER.COM
< prev
next >
Wrap
Text File
|
1988-04-12
|
4KB
|
108 lines
$!******************************************************************************
$! LASER.COM
$!
$! Copyright 1987 by: David Blanchard
$! NOAA/Weather Research Program
$! Boulder, Colorado
$!
$! (Unlimited distribution permitted as long as above copyright remain intact)
$!
$!
$!******************************************************************************
$! @LASER P1 P2 P3
$! Procedure to print on the LN03 printer
$! P1 is the file to be printed
$! P2 is the orientation...landscape/portrait
$! P3 is the font
$
$!******************************************************************************
$! Define some escape sequences
$
$ ESC[0,8] = 27
$ FF[0,8] = 12
$
$!******************************************************************************
$ON ERROR THEN GOTO ERR
$
$! If Parameters 1, 2 or 3 are missing, prompt the user for the values
$If P1 .EQS. "" THEN GOTO PROMPT
$If P2 .EQS. "" THEN GOTO PROMPT
$If P3 .EQS. "" THEN GOTO PROMPT
$
$! All parameters present...go to directory name
$
$Goto DIRNAME
$
$!******************************************************************************
$PROMPT:
$COPY SYS$INPUT SYS$OUTPUT
<Usage:> LASER P1 P2 P3 <no prompts>
or LASER <with prompts>
P1 is the name of the text file to be printed
P2 is the orientation of the printed page
= 1 Portrait mode (P3 = 1,2, or 3)
= 2 Landscape mode (P3 = 1,2, or 3)
= 3 Tektronix 4014 mode (P3 = 8,9, or 0)
P3 is the font style to be used
= 1 Courier 6.7 point, 13.6 pitch, 66 lines/page
= 2 Courier 10 point, 10 pitch, 48 lines/page
= 3 Elite 10 point, 12 pitch, 48 lines/page
= 8 ModGothic 14 point, 7.1 pitch, 35 lines/page
= 9 ModGothic 14 point, 7.9 pitch, 39 lines/page
= 0 Courier 6.7 point, 12 pitch, 58 lines/page
WARNING!!!
If you select P2=3, then DO NOT abort the print cycle unless you
plan to do either a software or hardware reset of the LN03.
$!******************************************************************************
$Inquire/NoPunc P1 "_File Name: "
$Inquire/NoPunc P2 "_Orientation: "
$Inquire/NoPunc P3 "_Font: "
$
$If P1 .EQS. "" .OR. P2 .EQS. "" .OR. P3 .EQS. "" THEN GOTO PROMPT
$
$!******************************************************************************
$! Determine the current directory name
$DIRNAME:
$
$DIR = F$DIRECTORY()
$
$!******************************************************************************
$! Open file for escape sequence to set mode and font style
$Open/Write/Error=LABEL1 SET_MODE TEMP001.ESC
$IF P2 .EQS. 1 THEN WRITE SET_MODE ESC,"[?20 J" !Portrait mode
$IF P2 .EQS. 2 THEN WRITE SET_MODE ESC,"[?21 J" !Landscape mode
$IF P2 .EQS. 3 THEN WRITE SET_MODE ESC,"[?38h",ESC,FF !4014 mode
$
$IF P3 .EQS. 1 THEN WRITE SET_MODE ESC,"[15m"
$IF P3 .EQS. 2 THEN WRITE SET_MODE ESC,"[13m"
$IF P3 .EQS. 3 THEN WRITE SET_MODE ESC,"[14m"
$IF P3 .EQS. 8 THEN WRITE SET_MODE ESC,"8"
$IF P3 .EQS. 9 THEN WRITE SET_MODE ESC,"9"
$IF P3 .EQS. 0 THEN WRITE SET_MODE FF,ESC,":"
$CLOSE SET_MODE
$
$!******************************************************************************
$! Open file for escape sequence to reset to portrait mode
$
$OPEN/WRITE/ERROR=LABEL1 RESET_MODE TEMP002.ESC
$IF P2 .EQ. 3 THEN WRITE RESET_MODE ESC,"[?38l"
$WRITE RESET_MODE ESC,"[!p"
$CLOSE RESET_MODE
$
$!******************************************************************************
$! Print the file and delete the escape sequence files
$
$PRINT/QUE=TXC3:/NAME='P1' 'DIR'TEMP001.ESC/DELETE,-
'P1',-
'DIR'TEMP002.ESC/DELETE
$EXIT
$
$!******************************************************************************
$ERR:
$Print/Queue=TXC3: TEMP002.ESC/DELETE
$EXIT